package com.example.springboot.controller.hysitrix;

import com.example.springboot.bean.Department;
import com.example.springboot.service.DeptService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author:ChenZhangKun
 * @Date: 2023/11/12 19:55
 */
@RestController
@RequestMapping("/hysitrix")
@Slf4j
public class RequestMergeController  {
    @Resource
    private DeptService deptService;

    @GetMapping("/query/{id}")

    public Department queryById(@PathVariable(value = "id") Integer id) throws Exception{
        return deptService.getById(id).get();
    }






}
